package com.grj.parking.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 充电过程记录表
 * @TableName ev_charging_record
 */
@TableName(value ="ev_charging_record")
@Data
public class EvChargingRecord implements Serializable {
    /**
     * 充电记录ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 充电单号（唯一）
     */
    @TableField(value = "record_no")
    private String recordNo;

    /**
     * 租户ID
     */
    @TableField(value = "tenant_id")
    private Long tenantId;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 充电桩ID
     */
    @TableField(value = "charger_id")
    private Long chargerId;

    /**
     * 车位ID
     */
    @TableField(value = "space_id")
    private Long spaceId;

    /**
     * 停车场ID
     */
    @TableField(value = "parking_id")
    private Long parkingId;

    /**
     * 关联预约ID（如有）
     */
    @TableField(value = "reservation_id")
    private Long reservationId;

    /**
     * 车牌号
     */
    @TableField(value = "license_plate")
    private String licensePlate;

    /**
     * 车型
     */
    @TableField(value = "car_model")
    private String carModel;

    /**
     * 电池容量（kWh）
     */
    @TableField(value = "battery_capacity")
    private BigDecimal batteryCapacity;

    /**
     * 起始电量百分比（0-100）
     */
    @TableField(value = "start_soc")
    private Integer startSoc;

    /**
     * 结束电量百分比（0-100）
     */
    @TableField(value = "end_soc")
    private Integer endSoc;

    /**
     * 充电开始时间
     */
    @TableField(value = "start_time")
    private Date startTime;

    /**
     * 充电结束时间
     */
    @TableField(value = "end_time")
    private Date endTime;

    /**
     * 充电时长（分钟）
     */
    @TableField(value = "duration")
    private Integer duration;

    /**
     * 充电量（kWh）
     */
    @TableField(value = "charged_energy")
    private BigDecimal chargedEnergy;

    /**
     * 起始里程（公里）
     */
    @TableField(value = "start_mileage")
    private Integer startMileage;

    /**
     * 结束里程（公里）
     */
    @TableField(value = "end_mileage")
    private Integer endMileage;

    /**
     * 状态：INIT-初始化，CHARGING-充电中，PAUSED-暂停，COMPLETED-完成，CANCELLED-取消，FAULT-故障
     */
    @TableField(value = "status")
    private String status;

    /**
     * 故障代码（如有）
     */
    @TableField(value = "fault_code")
    private String faultCode;

    /**
     * 故障描述
     */
    @TableField(value = "fault_desc")
    private String faultDesc;

    /**
     * 
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}